package com.it.viewdraghelper;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;

import com.nineoldandroids.view.ViewHelper;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
//        setContentView(R.layout.activity_main);
        setContentView(R.layout.activity_main_mydragviewlayout);
        View viewById = findViewById(R.id.tv);
             if(viewById==null){
                 return;
             }
//        ViewHelper.setTranslationX(viewById, float);
    /*    ViewHelper.setPivotX(viewById,0);
        ViewHelper.setPivotY(viewById,540);*/
        ViewHelper.setScaleX(viewById,0.5f);
        ViewHelper.setScaleY(viewById,0.5f);
        ViewHelper.setPivotX(viewById,0);
        ViewHelper.setPivotY(viewById,0);
    }

}
